<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/template.xhtml">
	<ui:define name="center">

		<h:form  id="login" >
		<p:fieldset legend="Authentification">
			<h:panelGrid columns="5" cellpadding="5">
			 
				<h:outputLabel for="username" value="Login :" />
				
				
                <p:inputText id="username"  value="#{loginBean.username}"   label="Login"/>
                
				<h:outputLabel for="password" value="password: " />
				
				
       			<p:inputText id="password"  required="true" value="#{loginBean.password}" label="password"/>
       			
				
				<p:commandButton value="Login"  type="submit" action="#{loginBean.login}"/>
				
			</h:panelGrid>
			</p:fieldset>
		</h:form>

		<h:form style="margin-top:20px" >
		<p:fieldset legend="Inscription">
			<h:panelGrid columns="2" cellpadding="5"  style="margin-top:20px" >
			
				<h:outputLabel for="Nom" value="Nom :" />
				<p:inputText value="#{utilisateurBean.utilisateur.nom}" id="Nom"
					required="true" label="Nom" />
					
				<h:outputLabel for="Prenom" value="Prenom" />
				<p:inputText value="#{utilisateurBean.utilisateur.prenom}" id="Prenom"
					required="true" label="username" />
					
				<h:outputLabel for="Login" value="Login" />
				<p:inputText value="#{utilisateurBean.utilisateur.login}" id="Login"
					required="true" label="Login" />
					
				<h:outputLabel for="password" value="password" />
				<p:inputText value="#{utilisateurBean.utilisateur.motDePasse}" id="password"
					required="true" label="password" />
					           
			     <h:outputLabel for="statut" value="Statut: *" />  
				 <h:selectOneMenu id="statut" value="#{utilisateurBean.statut}" required="true">  
                 <f:selectItem itemLabel="Selectionner un choix" itemValue="" />  
                 <f:selectItems value="#{utilisateurBean.listStatut}" />  
                 </h:selectOneMenu>  
				
				<p:commandButton value="Connexion" ajax="false"  action="#{utilisateurBean.createUtilisateurBean}"/>

				
				
			</h:panelGrid>
			</p:fieldset>
		</h:form>


	</ui:define>
</ui:composition>
</html>